-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce linter on all files and packages #641
Conversation
Flagging that there's one left that I'm not sure how to fix
|
Flagging that I got a "success" email for the build (2 really) though I expected it to fail since we now run the linter on the whole library. |
It just doesn't like this line: import (
. "github.com/stripe/stripe-go" It's considered poor practice to use import (
stripe "github.com/stripe/stripe-go" And putting
You still need to specify the |
And also: wow :) This is a serious piece of work!! |
65b1ae8
to
450d529
Compare
@brandur-stripe ha I tried a few things but did not think to rename the .! Thanks for the quick answer. PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, but looks amazing!
I'm pleasantly surprised by how many legitimate documentation problems the linter picked up. It looks like this'll be a huge improvement for preventing documentation-related problems from being introduced in the future.
ptal @remi-stripe
product.go
Outdated
// PackageDimensions represents the dimension of a product or a sku from the | ||
// perspective of shipping. | ||
// PackageDimensionsParams represents the set of parameters for the the dimension of a | ||
// product or a sku from the perspective of shipping . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we capitalize "SKU" here, just for completeness?
sku.go
Outdated
const ( | ||
SKUInventoryValueInStock SKUInventoryValue = "in_stock" | ||
SKUInventoryValueLimited SKUInventoryValue = "limited" | ||
SKUInventoryValueOutOfStock SKUInventoryValue = "out_of_stock" | ||
) | ||
|
||
// InventoryParams is the set of parameters allowed as inventory on a SKU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we punctuate the end of this sentence?
webhook/client.go
Outdated
ErrNotSigned = errors.New("Webhook has no Stripe-Signature header") | ||
ErrInvalidHeader = errors.New("Webhook has invalid Stripe-Signature header") | ||
ErrTooOld = errors.New("Timestamp wasn't within tolerance") | ||
ErrNoValidSignature = errors.New("Webhook had no valid signature") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you lowercase the first letter of all these errors?
(Surprised that Golint didn't catch this — that may be a bug.)
params.go
Outdated
@@ -16,6 +16,7 @@ import ( | |||
// Public constants | |||
// | |||
|
|||
// Describes possible values for type of pagination when using a List API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change this one to:
// Contains constants for the names of parameters used for pagination in list APIs.
@brandur-stripe Thanks for the quick review! Just fixed all of those, PTAL! |
Thanks Remi! LGTM. |
Released as 38.0.0. Well, I hate to do two major versions in one day, but I figure that we may as well release this one while very few people have picked up version 37. |
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.3.0 to 4.4.0. - [Release notes](https://github.com/SeleniumHQ/selenium/releases) - [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES) - [Commits](SeleniumHQ/selenium@selenium-4.3.0...selenium-4.4.0) --- updated-dependencies: - dependency-name: selenium-webdriver dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This enforces the linter on all files and packages and fixes all the current errors
golint ./...
Account
resource whereIdentityVerificationDetailsCodeScanIdCountryNotSupported
is nowIdentityVerificationDetailsCodeScanIDCountryNotSupported
Account
resource whereIdentityVerificationDetailsCodeScanIdTypeNotSupported
is nowIdentityVerificationDetailsCodeScanIDTypeNotSupported
BitcointReceiver
resource whereBitcoinUri
is nowBitcoinURI
.IssuingAuthorization
resource whereNetworkId
is nowNetworkID
r? @brandur-stripe
cc @stripe/api-libraries